// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_MST_WAREHOUSE
// * CreateDate    : 2012/10/29 14:52:54
// * Creater       : MstWarehouseEntity
// * LastChangeDate: 2012/10/29 14:52:54
// * LastChanger   : 2012/10/29 14:52:54
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class MstWarehouseEntity : EntityBase
    {
        public MstWarehouseTable TableSchema
        {
            get
            {
                return MstWarehouseTable.Current;
            }
        }

        public MstWarehouseEntity()
        {

        }

        public MstWarehouseEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.WarehouseName = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_NAME"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Manager = Convert.ToString(CommonFunctions.ToObject(dr["MANAGER"]));
            this.Locked = Convert.ToInt32(CommonFunctions.ToObject(dr["LOCKED"]));
            this.DeleteFlag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETE_FLAG"]));
            this.WarehouseType = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_TYPE"]));
        }

        public MstWarehouseEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.WarehouseCode = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_CODE"]));
            this.WarehouseName = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_NAME"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.Description = Convert.ToString(CommonFunctions.ToObject(dr["DESCRIPTION"]));
            this.Manager = Convert.ToString(CommonFunctions.ToObject(dr["MANAGER"]));
            this.Locked = Convert.ToInt32(CommonFunctions.ToObject(dr["LOCKED"]));
            this.DeleteFlag = Convert.ToInt32(CommonFunctions.ToObject(dr["DELETE_FLAG"]));
            this.WarehouseType = Convert.ToString(CommonFunctions.ToObject(dr["WAREHOUSE_TYPE"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return MstWarehouseTable.Current;
            }
        }

        #region Perporty List
        public string WarehouseCode
        {
            get { return Convert.ToString(GetData(MstWarehouseTable.C_WAREHOUSE_CODE)); }
            set { SetData(MstWarehouseTable.C_WAREHOUSE_CODE, value); }
        }

        public string WarehouseName
        {
            get { return Convert.ToString(GetData(MstWarehouseTable.C_WAREHOUSE_NAME)); }
            set { SetData(MstWarehouseTable.C_WAREHOUSE_NAME, value); }
        }

        public int Sequence
        {
            get { return Convert.ToInt32(GetData(MstWarehouseTable.C_SEQUENCE)); }
            set { SetData(MstWarehouseTable.C_SEQUENCE, value); }
        }

        public string Description
        {
            get { return Convert.ToString(GetData(MstWarehouseTable.C_DESCRIPTION)); }
            set { SetData(MstWarehouseTable.C_DESCRIPTION, value); }
        }

        public string Manager
        {
            get { return Convert.ToString(GetData(MstWarehouseTable.C_MANAGER)); }
            set { SetData(MstWarehouseTable.C_MANAGER, value); }
        }

        public int Locked
        {
            get { return Convert.ToInt32(GetData(MstWarehouseTable.C_LOCKED)); }
            set { SetData(MstWarehouseTable.C_LOCKED, value); }
        }

        public int DeleteFlag
        {
            get { return Convert.ToInt32(GetData(MstWarehouseTable.C_DELETE_FLAG)); }
            set { SetData(MstWarehouseTable.C_DELETE_FLAG, value); }
        }

        public string WarehouseType
        {
            get { return Convert.ToString(GetData(MstWarehouseTable.C_WAREHOUSE_TYPE)); }
            set { SetData(MstWarehouseTable.C_WAREHOUSE_TYPE, value); }
        }

        #endregion
    }


}

